package com.ai.core.pagemode;

import java.util.Collection;

public class RowWrapper implements java.io.Serializable {
	private static final long serialVersionUID = 1L;
	/**
	 * 当前行在Excel中行号
	 */
	private int row;
	/**
	 * 当前行所有列对应的单元格值对象
	 */
	private Object entity;
	/**
	 * 是否通过验证
	 */
	private boolean validate = true;

	private String errorMsg;

	public String getErrorMsg() {
		return "行[" + row + "]:" + errorMsg;
	}

	public void setErrorMsg(String errorMsg) {
		this.errorMsg = errorMsg;
	}

	public void appendErrorMsg(String errorMsg) {
		if (this.errorMsg == null) {
			this.errorMsg = "";
		}
		if (this.errorMsg.length() > 0) {
			this.errorMsg = this.errorMsg + ", ";
		}
		this.errorMsg = this.errorMsg + errorMsg;
	}

	public int getRow() {
		return row;
	}

	public void setRow(int row) {
		this.row = row;
	}

	public Object getEntity() {
		return entity;
	}

	public void setEntity(Object entity) {
		this.entity = entity;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public boolean isValidate() {
		return validate;
	}

	public void setValidate(boolean validate) {
		this.validate = validate;
	}
}
